package cn.wsn2018.tools.model;


public class User {
    private String id;
    private String username;
    private String password;
    private String role;
    /**
     * lock:
     * 0-未锁定 1-锁定
     * 多次登录失败会被锁定
     * */
    private Integer lock;
    /**
     * state:
     * 账号状态
     * 0-已经注销 1-休眠  2-激活
     *
     * 账号只注销 不删除
     *
     * */
    private Integer state;
    /**
     * type:
     * 账号类型  0-临时账号  1-永久账号
     *
     * */
    private Integer type;
    /**
     * accessTime：
     * 可访问的时段
     * 0-全天可以  1-  8:30-17:00  2- 8:30-11:30am   3- 13:30-17:00
     *
     * */
    private Integer accessTime;

    /**
     * permssion:
     * 权限
     * 0-请求授予权限   1-未授予权限  2-已授权
     *
     * */
    private Integer permission;

    /**
     * idCard:
     * 身份证号
     * */
    private String idCard;
    /**
     * phone:
     * 手机号
     * */
    private String phone;
    /**
     * ipAddress:
     * ip地址
     * */
    private String ipAddress;   //ip地址，默认为null
    private String pwdUpdateTime;   //密码修改时间
    private String lockedDateTime;  //被锁定时间
    private String lastTime;    //上次登录的时间，null可表示第一次登录
    private String lastSleepTime;   //上次进入休眠期的时间
    private String createTime;  //账号创建时间
    private Integer online;

    public Integer getPermission() {
        return permission;
    }

    public void setPermission(Integer permission) {
        this.permission = permission;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getRole() {
        return role;
    }

    public void setRole(String role) {
        this.role = role;
    }

    public String getCreateTime() {
        return createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    public Integer getLock() {
        return lock;
    }

    public void setLock(Integer lock) {
        this.lock = lock;
    }

    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public Integer getAccessTime() {
        return accessTime;
    }

    public void setAccessTime(Integer accessTime) {
        this.accessTime = accessTime;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getIdCard() {
        return idCard;
    }

    public void setIdCard(String idCard) {
        this.idCard = idCard;
    }

    public String getIpAddress() {
        return ipAddress;
    }

    public void setIpAddress(String ipAddress) {
        this.ipAddress = ipAddress;
    }

    public String getPwdUpdateTime() {
        return pwdUpdateTime;
    }

    public void setPwdUpdateTime(String pwdUpdateTime) {
        this.pwdUpdateTime = pwdUpdateTime;
    }

    public String getLastTime() {
        return lastTime;
    }

    public void setLastTime(String lastTime) {
        this.lastTime = lastTime;
    }

    public Integer getOnline() {
        return online;
    }

    public void setOnline(Integer online) {
        this.online = online;
    }

    public String getLockedDateTime() {
        return lockedDateTime;
    }

    public void setLockedDateTime(String lockedDateTime) {
        this.lockedDateTime = lockedDateTime;
    }

    public String getLastSleepTime() {
        return lastSleepTime;
    }

    public void setLastSleepTime(String lastSleepTime) {
        this.lastSleepTime = lastSleepTime;
    }

    @Override
    public String toString() {
        return "User{" +
                "id='" + id + '\'' +
                ", username='" + username + '\'' +
                ", password='" + password + '\'' +
                ", role='" + role + '\'' +
                ", lock=" + lock +
                ", state=" + state +
                ", type=" + type +
                ", accessTime=" + accessTime +
                ", permission=" + permission +
                ", idCard='" + idCard + '\'' +
                ", phone='" + phone + '\'' +
                ", ipAddress='" + ipAddress + '\'' +
                ", pwdUpdateTime='" + pwdUpdateTime + '\'' +
                ", lockedDateTime='" + lockedDateTime + '\'' +
                ", lastTime='" + lastTime + '\'' +
                ", lastSleepTime='" + lastSleepTime + '\'' +
                ", createTime='" + createTime + '\'' +
                ", online=" + online +
                '}';
    }
}
